package org.exez.modules.quartz.job;

import lombok.extern.slf4j.Slf4j;
import org.exez.modules.visitor.service.SjyService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 正在白名单传输
 *
 * @Author Scott
 */
@Slf4j
public class WhiteListDataDistributionJob implements Job {

    static int a = 0;

    @Autowired
    private SjyService sjyService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        if (a == 0) {
        	a = 1;
            log.info("=============正在白名单传输======================");
            Boolean aBoolean = sjyService.whiteListDataDistribution();
            log.info("=============结束白名单传输======================");
            a = 0;
        }
    }
}
